using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayPick : MonoBehaviour
{
   
    private void OnCollisionEnter(Collision collision)
    {
        print("Good");
        if (collision.gameObject.tag==Tag.INTERACTABLE)
        {
            PickableObject po=collision.gameObject.GetComponent<PickableObject>();
            
            if (po!=null)
            {
                
                InventoryManager.Instance.AddItem(po.itemSO);
                Destroy(po.gameObject);
            }
        }
    }
}
